package CfengMiddleWare.model.entity;

import java.math.BigDecimal;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.baomidou.mybatisplus.annotation.TableId;
import java.io.Serializable;
import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * <p>
 * 用户账户表
 * </p>
 *
 * @author cfeng
 * @since 2022-09-20
 */
@Data
@EqualsAndHashCode(callSuper = false)
public class UserAccount extends Model<UserAccount> {

    private static final long serialVersionUID = 1L;

    /**
     * 主键
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    /**
     * 用户账户id
     */
    private Integer userId;

    /**
     * 账户余额
     */
    private BigDecimal amount;

    /**
     * 版本号字段
     */
    private Integer version;

    /**
     * 是否有效(1=是;0=否)
     */
    private Integer isActive;


    @Override
    protected Serializable pkVal() {
        return this.id;
    }

}
